package Test;

public class Sock {
    String string1;
    static int age;
    public Sock(){
        this.string1="chf";
        System.out.println("method");
    }
    //非静态的代码块
    {
        System.out.println("sock1");
    }
    //非静态的代码块
    {
        System.out.println("sock2");
    }
    //静态的代码块
    static {
        System.out.println("static sock");
    }
    static {
        System.out.println("static sock2");
    }
    public static void showAge(){
        System.out.println("age="+age);
    }
    public  static void showAge(int a){
        System.out.println("age="+age+a);
    }
    public  void showAge(int a,int b){
        System.out.println("age="+age+a+b);
    }
}
